-- GENERATED SPELL FOR [Anub'ar Guardian] --


function spell0_29216(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(52532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29216', 578, 1)
end

function spell1_29216(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(53618,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29216', 30260, 1)
end

function spell2_29216(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(59350,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29216', 30278, 1)
end

function Sorts_29216(pUnit, Event)
local choix_sorts_29216 = math.random(0, 2)
if choix_sorts_29216 == 0 then
pUnit:RegisterEvent('spell0_29216', 1, 1)
end
if choix_sorts_29216 == 1 then
pUnit:RegisterEvent('spell1_29216', 1, 1)
end
if choix_sorts_29216 == 2 then
pUnit:RegisterEvent('spell2_29216', 1, 1)
end
end

function mob29216_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29216', math.random(1500, 3000), 1)
end

function mob29216_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29216_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29216_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29216, 1, 'mob29216_Action')
RegisterUnitEvent(29216, 2, 'mob29216_Leave')
RegisterUnitEvent(29216, 3, 'mob29216_Kill')
RegisterUnitEvent(29216, 4, 'mob29216_Die')
